package com.liuyucheng.designpattern.工厂模式.simplefactory;

public class CarFactory {

    public static Car getCar(String name){
        if("wuling".equals(name)){
            return new Wuling();
        }else if("tesla".equals(name)){
            return new Tesla();
        }
        return null;
    }
}
